package com.huajin.springcodetest.config;

import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCacheManager;

@EnableCaching 
@Configuration
public class CacheConfig extends CachingConfigurerSupport {
	
	@Bean
	@Override
	public CacheManager cacheManager() {
		return RedisCacheManager.builder().build();
	}

}
